package him.action.factory;

import him.action.Action;
import him.action.ActionFactory;
import him.action.board.NoticeDetailAction;
import him.action.board.NoticeInsertAction;
import him.action.board.NoticeInsertBfAction;
import him.action.board.NoticeListAction;
import him.action.board.NoticeUpdateAction;
import him.action.board.NoticeUpdateBfAction;

public class BoardActionFactory implements ActionFactory {
	private static BoardActionFactory factory;
	
	public static BoardActionFactory getInstance(){
		if (factory==null) {
			factory=new BoardActionFactory();
		}
		return factory;
	}
	@Override
	public Action getAction(String command) {
		Action action = null;
		if (command.equalsIgnoreCase("noticedetail")) {
			action = new NoticeDetailAction();
		}else if (command.equalsIgnoreCase("noticelist")) {
			action = new NoticeListAction();
		}else if (command.equalsIgnoreCase("noticeinsert")) {
			action = new NoticeInsertAction();
		}else if (command.equalsIgnoreCase("noticeupdate")) {
			action = new NoticeUpdateAction();
		}else if (command.equalsIgnoreCase("noticeinsertbf")) {
			action = new NoticeInsertBfAction();
		}else if (command.equalsIgnoreCase("noticeupdatebf")) {
			action = new NoticeUpdateBfAction();
		}
		return action;
	}

}
